<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8" />
		<title>Document</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/mui.css" />
		<link rel="stylesheet" type="text/css" href="../css/info.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">个人信息</h1>
		</header>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell pic">
				<a class="mui-navigate-right fl">头像</a><img src="../img/head.jpg" class="headpic fr" id="headpic" />

			</li>
			<li class="mui-table-view-cell">
				<a class="mui-navigate-right fl">
					账号
				</a>
				<a class="mui-navigate-right aright fr">
					Hbuilder </a>

			</li>

		</ul>
		<script type="text/javascript" src="js/cropper.js"></script>
			
		
		<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="../js/jquery3.2.js"></script>
			
		
		<script type="text/javascript">
			mui.init()
			mui.plusReady(function() {
				var headpic = document.getElementById("headpic")
				headpic.onclick = function() {
					 var that = this;
					plus.gallery.pick(function(file) {
						console.log(JSON.stringify(file)); // 在手机中的绝对路径
						var files = file.files;
						for(var i = 0; i < files.length; i++) {
							var img = new Image();
							img.src = files[i];
							img.style.width = '30px';
							// document.body.appendChild(img);
                            //  this.src = img.src;
						    //  console.log(JSON.parse(this));
							that.src = img.src;
							//  console.log(img.toDataURL());
						}

						//  console.log(1111)

					}, function(error) {
						var code = error.code; // 错误编码
						var message = error.message; // 错误描述信息
						console.log(code); //  12
						console.log(message); //  User cancelled

					}, {
						multiple: true,
						maximum: 3,
						system: false
					})
				}

			})
		</script>
	</body>

</html>